<?php
/**
 * ============================================================================
 * Copyright (c) 2015-2019 贵州大师兄信息技术有限公司 All rights reserved.
 * siteַ: http://www.dsxcms.com
 * ============================================================================
 * @author:     David Song<songdewei@163.com>
 * @version:    v1.0.0
 * ---------------------------------------------
 * Date: 2019-03-08
 * Time: 11:27
 */

namespace App\Models\Traits;


use App\Models\BuyNews;
use App\Models\ProductNews;

trait UserNewsRelations
{
    /**
     * @return mixed
     */
    public function buyNews()
    {
        return $this->hasMany(BuyNews::class, 'uid', 'uid');
    }

    /**
     * @return mixed
     */
    public function saleNews()
    {
        return $this->hasMany(ProductNews::class, 'uid', 'uid');
    }
}
